<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<script src="js/jquery-3.0.0.min.js"></script>
	<style>
		*{
			margin: 0px;
			padding: 0px;
			list-style: none;
		}

		.box{
			width: 400px;
			height: 400px;
			border: 1px solid #000;
			position: relative;
		}

		.con{
			width: 100px;
			height: 100px;
			background: red;
			position: absolute;
		}
	</style>
</head>
<body>
	<div class="box">
		<div class="con"></div>
	</div>
	<script>
		$(document).mousemove(function(e){
			$('.con').css({'left':e.clientX-50+'px','top':e.clientY-50+'px'})
		});
	</script>
</body>
</html>